﻿using System;
using System.Collections.Generic;

namespace ApplicationManager.Model
{
    public class MitmProxyAppInfoModel
    {
        public string Id { get; set; }=Guid.NewGuid().ToString();
        public string Name { get; set; }
        public string ProxyIP {  get; set; }
        public int ProxyPort { get; set; }
        public string ProxyUserName { get; set; }
        public string ProxyPassword { get; set; }
        public int Port {  get; set; }  
        public int ProcessId { get; set; }

        /// <summary>
        /// 子进程ID
        /// </summary>
        public List<int> SubProcessIds { get; set; }=new List<int>();
        public DateTime CreateTime { get; set; }

    }

    public class MitmProxyAppInfoRequest
    {
        public string Id { get; set; } = Guid.NewGuid().ToString();
        public string Name { get; set; }
        public string ProxyIP { get; set; }
        public int ProxyPort { get; set; }
        public string ProxyUserName { get; set; }
        public string ProxyPassword { get; set; }

        public int Port { get; set; }
    }

    public class MitmProxyAppInfoResponse
    {
        public string Id { get; set; } = Guid.NewGuid().ToString();
        public string Name { get; set; }
        public string ProxyIP { get; set; }
        public int ProxyPort { get; set; }
        public string ProxyUserName { get; set; }
        public string ProxyPassword { get; set; }
        public string IPPort { get; set; }
        public int ProcessId { get; set; }
        /// <summary>
        /// 内存占用 MB
        /// </summary>
        public long MemoryUsage { get; set;}
        public bool Status { get; set; } //1  "Running", 0 "Stopped"  
    }
}
